﻿using Anke.SHManage.Model.FixedAssetsModel;
using Anke.SHManage.MSSQLDAL.FixedAssetsDAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Anke.SHManage.BLL.FixedAssetsBLL
{
    /// <summary>
    /// 固定资产基础信息列表 BLL
    /// plq
    /// </summary>
    public class FixedAssetsMaterialBLL
    {

        /// <summary>
        /// 获取固定资产信息列表
        /// </summary>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="assetName"></param>
        /// <param name="assetID"></param>
        /// <param name="assetTypeID"></param>
        /// <param name="isScrap"></param>
        /// <param name="assetBrand"></param>
        /// <param name="assetCurStorageID"></param>
        /// <param name="assetManageDep"></param>
        /// <param name="ambulanceNum"></param>
        /// <returns></returns>
        public object GetAssetsList(int pageSize, int pageIndex, string assetName, string assetID, string assetTypeID, bool isScrap, string assetBrand, int assetCurStorageID, string assetManageDep, string ambulanceNum)
        {
            return new FixedAssetsMaterialDAL().GetAssetsList(pageSize, pageIndex, assetName, assetID, assetTypeID, isScrap, assetBrand, assetCurStorageID, assetManageDep, ambulanceNum);
        }

        /// <summary>
        /// 新增固定资产
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool InsertEditPageData(FIXED_MatetialInfo info)
        {
            return new FixedAssetsMaterialDAL().InsertEditPageData(info);
        }

        /// <summary>
        /// 判断是否该固定资产编码是否已有数据
        /// </summary>
        /// <param name="code">固定资产编码</param>
        /// <returns></returns>
        public bool IsHaveCurrentData(string code)
        {
            return new FixedAssetsMaterialDAL().IsHaveCurrentData(code);
        }

        /// <summary>
        /// 获取编辑页初始数据
        /// </summary>
        /// <param name="Code"></param>
        /// <returns></returns>
        public FIXED_MatetialInfo GetEditPageData(string Code)
        {
            return new FixedAssetsMaterialDAL().GetEditPageData(Code);
        }

        /// <summary>
        /// 保存编辑固定资产
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool UpdateEditPageData(FIXED_MatetialInfo info)
        {
            return new FixedAssetsMaterialDAL().UpdateEditPageData(info);
        }

        /// <summary>
        /// 删除单条数据
        /// </summary>
        /// <param name="Code"></param>
        /// <returns></returns>
        public bool DeleteData(string Code)
        {
            return new FixedAssetsMaterialDAL().DeleteData(Code);
        }
    }
}
